package com.woniuxy.controller;


import com.woniuxy.controller.form.AddGoodsIdentify;
import com.woniuxy.controller.form.FindGoodsIf;
import com.woniuxy.exception.DdException;
import com.woniuxy.service.PawnGoodsIdentifyLogService;
import com.woniuxy.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author hujianying
 * @since 2022-03-23
 */
@RestController
@Api(tags = "鉴定相关接口")
@RequestMapping("/pawnGoodsIdentifyLog")
public class PawnGoodsIdentifyLogController {
    @Resource
    private PawnGoodsIdentifyLogService goodsIdentifyLogService;

    /**
     * 新增商品鉴定记录
     * @param addGoodsIdentify
     * @return
     */
    @ApiOperation("新增鉴定")
    @PostMapping("addgoodsif")
    public Result addIdentifyLog(@RequestBody AddGoodsIdentify addGoodsIdentify, BindingResult bindingResult) throws DdException {

        return goodsIdentifyLogService.addgoodsIdentifyLong(addGoodsIdentify,bindingResult);
    }

    @ApiOperation("查看鉴定记录")
    @GetMapping("/findgoodsif")
    public Result selsectgoodsdentifyLog( FindGoodsIf findGoodsIf){

        System.out.println(findGoodsIf);
        return goodsIdentifyLogService.selsectgoodsdentifyLog(findGoodsIf);
    }



}

